<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            display: flex;
            width: 60%;
            height: 400px;
            background-color: pink;
        }
        div span{
            width: 150px;
            height: 100px;
            line-height: 100px;
            text-align: center;
            color: #fff;
            font-size: 30px;
            background-color: purple;
            margin-right: 5px;
        }
        
        div span:nth-child(2) {
            /* order定义项目的排列顺序 */
            /* 默认是0, -1比0小，所以在前面 */
            order: -1;
        }

        /* align-self控制子项在侧轴上的排列方式 */
        div span:nth-child(3){
            align-self:flex-end;
            /* 设置为200px */
            flex-basis: 200px;
        }
        
        div span:nth-child(4) {
            /* 将第4个盒子设置为不可拉伸不可收缩，长度固定为300px */
            flex: 0 0 300px;
        }
    </style>
</head>
<body>
    <div>
        <span>1</span>
        <span>2</span>
        <span>3</span>
        <span>4</span>
    </div>
</body>
</html>